package _03线程属性;

public class TestDemo {

	public static void main(String[] args) {

		MyThread t1 = new MyThread();
		t1.setName("子线程1");// 设定线程名
		t1.setPriority(1);// 设定线程优先级 10 为最高

		MyThread t2 = new MyThread();
		t2.setName("子线程2");

		MyThread t3 = new MyThread();
		t3.setName("子线程3");
		t3.setPriority(10);

		t1.start();
		t2.start();
		t3.start();

//		t1.run();
//		t2.run();
//		t3.run();

		// 打印线程信息
		System.out.println("主线程编号" + Thread.currentThread().getId());// 线程编号
		System.out.println("主线程名字" + Thread.currentThread().getName());// 线程名
		System.out.println("主线程优先级" + Thread.currentThread().getPriority());// 5 1~10

	}

}
